package cn.dansj.repository;

import cn.dansj.entity.RoleMenu;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RoleMenuRepository extends JpaRepository<RoleMenu, String> {
    List<RoleMenu> findAllByRole(String role);

    @Modifying
    void deleteByRole(String role);

}
